﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using GeckoPhotos.Models;

namespace GeckoPhotos.Tests.TestUtil
{
    static class BlobUtil
    {
        // Values to test against and predetermine outcomes of calls to mock objects
        private const int _blobId = 9;
        private const string _mimeType = "text/plain";
        private static readonly byte[] _bytes = new byte[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
        
        private static Blob _standardBlobObject;

        public static Blob CreateBlobObject()
        {
            return new Blob
            {
                BlobID = _blobId,
                MimeType = _mimeType,
                Bytes = _bytes,
            };
        }

        public static Blob StandardBlobObject
        {
            get
            {
                if (_standardBlobObject == null)
                {
                    _standardBlobObject = CreateBlobObject();
                }
                return _standardBlobObject;
            }
        }

    }
}
